<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="x-ua-compatible" content="IE=edge, chrome=1">
    <title>j5shop商城</title>
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <link href="/street/css/public.css" type="text/css" rel="stylesheet"/>
    <link href="/street/css/jifen.css" type="text/css" rel="stylesheet"/>
    <script type="text/javascript" src="/street/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="/street/js/slide.js"></script>
</head>
<script>
    $(function(){
        $('.nav ul li').hover(function(){
            $(this).children(".details").show();
        },function(){
            $(this).children(".details").hide();
        });
        $('#my').hover(function(){
            $(this).find("div").show();
        },function(){
            $(this).find("div").hide();
        });
    });
</script>
<body>
<div th:replace="street/layout/mallHeader"></div>
<!-----------------内容------------------>
<div class="wt1080 middle">
    <div class="fl">
        <div style="padding: 0 24px;"><h1>用户名称</h1></div>
        <ul>
            <li class="current"><a href="my_order.html">我的订单</a></li>
            <li><a href="youhuijuan.html">我的优惠卷</a></li>
            <li><a href="jifen.html">我的积分</a></li>
            <li><a href="ajax_me.html">账户安全</a></li>
            <li><a href="shoucang.html">我收藏的商品</a></li>
            <li><a href="ajax_address.html">管理收货地址</a></li>
        </ul>
    </div>
    <div class="fr">
        <div class="c_r_t">
            <ul>
                <li class="current"><a href="#">我的积分</a></li>
                <li><a href="#">积分明细</a></li>
            </ul>
            <div class="clear"></div>
        </div>
        <p class="explode">可用积分<font th:text="${jf}">62</font><span>2016-12-31</span> 将过期京豆<font>48</font>个</p>
        <!------------------兑换劵列表------------------->
        <div class="s_list">
            <ul>
                <li>
                    <div class="s_top">
                        ￥<font>10</font><span>满199元可用</span>
                    </div>
                    <div class="s_bottom">
                        <p>满199减10</p>
                        <p>适用范围：<font>全场通用，特例商品除外</font></p>
                        <p>使用期限：兑换后7天</p>
                        <p>其他限制：</p>
                        <a href="#" class="duihuan">100积分兑换</a>
                    </div>
                </li>
                <li>
                    <div class="s_top">
                        ￥<font>10</font><span>满199元可用</span>
                    </div>
                    <div class="s_bottom">
                        <p>满199减10</p>
                        <p>适用范围：<font>全场通用，特例商品除外</font></p>
                        <p>使用期限：兑换后7天</p>
                        <p>其他限制：</p>
                        <a href="#" class="duihuan">100积分兑换</a>
                    </div>
                </li>                <li>
                <div class="s_top">
                    ￥<font>10</font><span>满199元可用</span>
                </div>
                <div class="s_bottom">
                    <p>满199减10</p>
                    <p>适用范围：<font>全场通用，特例商品除外</font></p>
                    <p>使用期限：兑换后7天</p>
                    <p>其他限制：</p>
                    <a href="#" class="duihuan">100积分兑换</a>
                </div>
            </li>
            </ul>
            <div class="clear"></div>
        </div>
        <!-----------------选择栏--------------->
        <div class="vio">
            <ul>
                <li><a href="#" >积分明细</a></li>
                <li><a href="#" class="current">收入</a></li>
                <li><a href="#">支出</a></li>
                <li><a href="#">过期</a></li>
            </ul>
            <div class="clear"></div>
        </div>
        <!------------积分列表---------------->
        <div class="b_list">
            <div class="b_list_top">
                <span class="a">来源/用途</span>
                <span class="b">积分变化</span>
                <span class="c">日期</span>
            </div>
            <!--------------列表详细----------------->
            <div class="b_list_details">
                <ul>
                    <li th:each="jf:${jfList}">
                        <div class="d" th:text="${jf.source}"></div>
                        <div class="e red" th:text="${jf.addcount}">+24</div>
                        <div class="f" th:text="${jf.createdate}">2016年1月7日 12:09:08</div>
                    </li>
                </ul>
            </div>
        </div>

    </div>
</div>

<!---------------------热销------------------>
<div class="hot wt1080">
    <div class="title">热销推荐</div>
    <div class="content">
        <ul>
            <li th:each="com:${commList}">
                <div class="pic"><a th:href="@{'/street/goodsDetail/'+${com.id}}">
                    <img th:src="@{${com.img}}"></a></div>
                <p class="c_t"><a th:href="@{'/street/goodsDetail/'+${com.id}}" th:text="${com.title}">Regen10片</a></p>
                <p class="price" th:text="'￥'+${com.prices}">￥89.00</p>
                <a href="#" class="goumai" th:onclick="'addCart('+${com.id}+')'">立即购买</a>
            </li>
        </ul>
        <div class="clear"></div>
    </div>
</div>
<script type="text/javascript">

    function addCart(goodsid){
        console.log(goodsid);
        var count=1;
        $.ajax({
            type: "post",
            url: '/person/street/addCart',
            data: {
                goodsid:goodsid,
                count:count},
            dataType: "json",
            success:function(data) {
                if(data.code==0){
                    window.location.href = "/person/street/likBuy/"+goodsid;
                }else if(data.success=='login'){
                    window.location.href = "/street/login"
                }
            }
        });
    }

</script>
<div th:replace="street/layout/mallFooter"></div>
</body>
</html>
